<?php
session_start();
$username=$_POST['username'];
$password=$_POST['password'];
  include("../function.php");
  $conn = conn();
  $result=mysqli_query($conn,"select * from admin where username=\"$username \" and password=\"$password \"  ");
  $result=mysqli_fetch_assoc($result);
  if ($result) {
  	$_SESSION['is_login']='ok';
  	//setcookie("is_login",'ok');
  	header("location:index6.php");
  	//header("location:../index4.php");
  }else{
  	$_SESSION['is_login']='notok';
  	//setcookie("is_login",'notok');

  	
  	header("location:login.php");
  }
  	
  

